package com.by.ui.banner;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.by.ui.R;

/**
 * Created by admin on 2016/5/11.
 */
public class MyAdapter extends BaseAdapter {
    private LayoutInflater mInflater;

    public MyAdapter(Context context) {
        mInflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return 10;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        view = mInflater.inflate(R.layout.item_banner, viewGroup, false);
        TextView text = (TextView) view.findViewById(R.id.pos);
        text.setText("第"+(i + 1)+"个");

        return view;
    }
}
